IIFE

(function () {})();
function() {}()

This will throw syntax error.

But using IIFE we can call a function declaration immediately.

(function () {})();

Benefits of IIFE

(function () {
  var a = 10;
})();

a;

Here a is defined inside the function expression, not available in the global scope.